﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using JsonTest1.Data;
using Newtonsoft.Json.Linq;

namespace JsonTest1.Json
{
    public class PlaylistBuilder : JSONBuilder<PlaylistRemote>
    {
        public override PlaylistRemote Build(JObject jsonObject)
        {
            PlaylistRemote data = new PlaylistRemote();
            data.Id = (int)jsonObject["id"];
            data.Duration = (int)jsonObject["duration"];
            data.Name = (string)jsonObject["name"];

            return data;
        }
    }
}
